<template>
  <div>
    <!-- 我是home--首页 -->
    <!-- 三级联动全局组件：三级联动 -->

    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <Recommend></Recommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for="(floor) in floorList" :key="floor.id" :list="floor"></Floor>
    <Brand></Brand>

  </div>
</template>

<script>
// import TypeNav from './TypeNav/index.vue';
//引入其余组件
import ListContainer from '@/pages/Home/ListContainer/index.vue';
import Recommend from './Recommend/index.vue';
import Rank from './Rank/index.vue';
import Like from './Like/index.vue';
import Floor from './Floor/index.vue';
import Brand from './Brand/index.vue';

import { mapState } from 'vuex';
export default {
  components: { ListContainer, Recommend, Rank, Like, Floor, Brand },
  mounted() {
    this.$store.dispatch("getFloorList");
    // this.$store.dispatch("getUserInfo");
    // // 获取用户信息在首页显示
    // this.$store.dispatch("getUserInfo");
  },
  computed: {
    ...mapState({
      floorList: state => state.home.floorList
    })
  }
}
</script>

<style>

</style>